package com.lqy.mapper;

import com.zzg.entity.Driver;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author lqy
 * @version 1.0.0
 * @ClassName：DriverMapper
 * @Description: 车辆管理dao层
 * @date 2021/6/21
 **/
@Mapper
public interface DriverLqyMapper {

    /**
     * 查询车辆
     * @return
     */
    public List<Driver> getDriver();

    /**
     * 分页查询
     * @param page
     * @param limit
     * @return
     */
    public List<Driver> getCouByPage(@Param("page") int page, @Param("limit") int limit);

    /**
     * 新增车辆
     * @param driver
     * @return
     */
    public int insertDriver(Driver driver);

    /**
     * 修改车辆
     * @param driver
     * @return
     */
    public int updateDriver(Driver driver);

    /**
     * 删除车辆
     * @param driverId
     * @return
     */
    public int deleteDriver(@Param("drid")String driverId);

    /**
     * 根据ID查询车辆
     * @param driverId
     * @return
     */
    public Driver getUserById(@Param("drivid")String driverId);

    /**
     * 模糊查询
     * @return
     */
    public List<Driver> getDrivers(Driver driver);

}
